# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-scikit-image
_pkgname=scikit_image
pkgver=0.25.2
pkgrel=1
pkgdesc='Image processing routines for SciPy.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/scikit-image/#files'
license=('BSD')
depends=('python' 'python-numpy' 'python-scipy' 'python-matplotlib'
         'python-numpy' 'python-networkx' 'python-pillow' 'python-imageio'
         'python-pywavelets')
makedepends=('python-pip' 'python-build' 'python-wheel' 'python-numpy')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8977585f7695d10df52d243d9fafdba2e04b5f4d4fe698dd9353bdffc4de21ad61053f55a46ed6350d5de8f1cd7dab969d45b85613a0e5fdb0b28a84c72551a9')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

